<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

require_once 'function.membre_link.php';

/**
 * Smarty default modifier plugin
 *
 * Type:     modifier<br>
 * Name:     default<br>
 * Purpose:  designate default value for empty variables
 * @link http://smarty.php.net/manual/en/language.modifier.default.php
 *          default (Smarty online manual)
 * @param string
 * @param string
 * @return string
 */
function smarty_modifier_membre_link($string)
{
  if(is_numeric($string)){
    $params = array('id' => $string);
    return membre_link($params, null);
  } else {
    return $string;
  }

}

/* vim: set expandtab: */

?>
